package com.green.configfile.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Data
@Configuration
@ConfigurationProperties(prefix = "db")
//指定它读取那个文件
@PropertySource(value = {"application-db.properties"})
public class DataBaseConfig {

    private String classname;
    private String url;
    private String username;
    private String password;
}
